package com.linln.admin.meeting.validator;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author taofucheng
 * @date 2021/10/27
 */
@Data
public class OrderValid implements Serializable {
    @NotNull(message = "预订人不能为空")
    private Long userId;
    @NotNull(message = "预订的会议室不能为空")
    private Long meetingId;
    @NotNull(message = "会议开始时间不能为空")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    private Date startTime;
    @NotNull(message = "会议结束时间不能为空")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    private Date endTime;
    @NotEmpty(message = "会议主题不能为空")
    private String subject;
    @NotNull(message = "参会人数不能为空")
    private Integer persons;
}